package com.heima.article.controller.v1;

import com.heima.article.service.ApArticleService;
import com.heima.model.common.dtos.app.CollectionBehaviorDto;
import com.heima.model.common.dtos.common.ResponseResult;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/collection_behavior")
public class collectionBehaviorController {
    @Autowired
    private ApArticleService apArticleService;
    /**
     * 收藏功能
     * @param dto
     * @return
     */
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", dataType = "CollectionBehaviorDto", name = "dto", value = "", required = true)
    })
    @ApiOperation(value = "收藏功能", notes = "收藏功能", httpMethod = "POST")
    @PostMapping
    public ResponseResult collectionBehavior(@RequestBody CollectionBehaviorDto dto){
        return apArticleService.collectionBehavior(dto);
    }
}
